package com.rjt.common.util;

import java.time.LocalDateTime;
import java.util.Date;

/**  

* <p>Title: DateUtil.java</p>  

* <p>Description: </p>  

* @author renjiangtao 

* @date 2018年6月25日  

* @version 1.0  

*/
public class DateUtil {
    //返回一个20180625152936类型的数据
	public static String getNow() {
		LocalDateTime now = LocalDateTime.now();
		String year=now.getYear()+"";
		String mouth=now.getMonthValue()<10?"0"+now.getMonthValue():now.getMonthValue()+"";
		String day=now.getDayOfMonth()<10?"0"+now.getDayOfMonth():now.getDayOfMonth()+"";
		String hour=now.getHour()<10?"0"+now.getHour():now.getHour()+"";
		String minute=now.getMinute()<10?"0"+now.getMinute():now.getMinute()+"";
		String second=now.getSecond()<10?"0"+now.getSecond():now.getSecond()+"";
		
		StringBuilder sb=new StringBuilder();
		sb.append(year);
		sb.append(mouth);
		sb.append(day);
		sb.append(hour);
		sb.append(minute);
		sb.append(second);
		return sb.toString();
	}
	public static String getCurrent13Time() {
		 return  new Date().getTime()+"";
	}
}
